from django.urls import reverse

from django.shortcuts import render

from django.http import HttpResponse

# Create your views here.

def index(request):
    """
    index视图

    :param request:
    :return:
    """
    return HttpResponse('愿你成蝶')

def hello(request):

    return HttpResponse('我不求成蝶')

def word(request):
    return HttpResponse('但求成为一股你旁边的风')

def money(request):

    return HttpResponse('能帮你前行')
def total(request):
    return HttpResponse('就够了')
def hat(request):
    # 反向解析,定义命名空间，命名空间找路由
    url = reverse('user:hat')
    print(url)
    return HttpResponse('只是俗人，无法给你更好的')

# def weather1(request):
    #
    # return HttpResponse('ok')
